package com.core.adapter;

import android.util.SparseArray;
import android.view.View;

/**
 * Created by mac_wk on 14-10-27.
 */
public class BaseViewHolder {
    public SparseArray<View> views = new SparseArray<View>();
    public <T extends View> T obtainView(View convertView, int resId) {
        View v = views.get(resId);
        if (null == v) {
            v = convertView.findViewById(resId);
            views.put(resId, v);
        }
        return (T) v;
    }

}
